package com.service.impl;

import com.mapper.Log4jMapper;
import com.pojo.Checkout;
import com.pojo.Commoditylog4j;
import com.service.Log4jService;
import com.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Service
@Transactional
public class Log4jServiceImpl implements Log4jService {
    @Autowired
    public Log4jMapper mapper;

//    查询结账清单
    @Override
    public List<Map<String, Object>> checkoutSelect(Integer cid) {
        return mapper.checkoutSelect(cid);
    }


//    添加结账清单
    @Override
    public int checkoutInsert(Checkout checkout) {
        return mapper.checkoutInsert(checkout);
    }


//    删除结账清单
    @Override
    public int checkoutDelCid(Integer cid) {
        return mapper.checkoutDelCid(cid);
    }


//    查询销售记录
    @Override
    public List<Map<String,Object>> commoditylogSelect(Integer logid, Integer cid,String tname, String hiredate, Integer state) {
        return mapper.commoditylogSelect(logid, cid,tname,hiredate, state);
    }


//    添加销售记录
    @Override
    public int commoditylogInsert(Commoditylog4j commoditylog4j) {
        return mapper.commoditylogInsert(commoditylog4j);
    }


    //    基础面积图
    @Override
    public List<Map<String, Object>> commoditylogRecords() {
        return mapper.commoditylogRecords();
    }


    //玫瑰图
    @Override
    public List<Map<String, Object>> commoditylogPies() {
        return mapper.commoditylogPies();
    }


}
